package com.yuantong.xyerp.core.api.model;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 开票记录，发票附件统一通过附件模块保存，通过发票id可以获取
 * </p>
 *
 * @author JianguoYin
 * @since 2021-08-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Invoice对象", description="开票记录，发票附件统一通过附件模块保存，通过发票id可以获取")
public class Invoice implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "开票id")
    private String id;

    @ApiModelProperty(value = "发票编号")
    private String invoiceNo;

    @ApiModelProperty(value = "关联合同编号")
    private String contractNo;

    @ApiModelProperty(value = "开票类型：1-销售开票，2-采购代开票")
    private String type;

    @ApiModelProperty(value = "开票名称")
    private String invoiceTitle;

    @ApiModelProperty(value = "单价")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "开票金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "发票税点")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "购买方名称")
    private String buyerName;

    @ApiModelProperty(value = "购买方纳税人识别号")
    private String buyerTaxNo;

    @ApiModelProperty(value = "购买方地址")
    private String buyerAddress;

    @ApiModelProperty(value = "购买方电话")
    private String buyerTel;

    @ApiModelProperty(value = "购买方开户行")
    private String buyerBank;

    @ApiModelProperty(value = "购买方账号")
    private String buyerAccount;

    @ApiModelProperty(value = "销售方名称")
    private String sellerName;

    @ApiModelProperty(value = "销售方地址")
    private String sellerAddress;

    @ApiModelProperty(value = "销售方纳税人识别号")
    private String sellerTaxNo;

    @ApiModelProperty(value = "销售方电话")
    private String sellerTel;

    @ApiModelProperty(value = "销售方开户行")
    private String sellerBank;

    @ApiModelProperty(value = "销售方账号")
    private String sellerAccount;

    @ApiModelProperty(value = "经办人UUID")
    private String operatorId;

    @ApiModelProperty(value = "开票时间")
    private LocalDate operateTime;

    @ApiModelProperty(value = "创建人")
    private String creatorId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "发票备注")
    private String remark;

    @ApiModelProperty(value = "审核人id")
    private String confirmerId;

    @ApiModelProperty(value = "审核时间")
    private Date confirmTime;

    @ApiModelProperty(value = "审核备注")
    private String confirmRemark;

    @ApiModelProperty(value = "开票状态：0-保存，1-审核中，2-审核通过，-1-审核不通过")
    private String status;


}
